The use of virtual machine software has experienced unprecedented growth in recent times. Originally designed as a software testing platform, virtual machine software emulates and/or simulates the hardware of a real computer system, allowing software that executes on a real machine to be executed within the emulated/simulated environment without modification. The virtualized machine presented by the virtualization software appears as a real computer system to the software executing on such a virtual machine.
With the advent of hot swappable devices in real computer systems, virtual machines are now available that can emulate/simulate the same hot swapping of devices as real machines. This virtual hot swapping capability allows multiple virtual machines, executing on a single real computer system, to dynamically add and remove virtualized hardware resources to the configuration of the virtual machine on an as-needed basis. Further, because the virtual machines emulate/simulate real computer systems, the virtual machines also emulate/simulate the firmware of a real computer system, including industry standard firmware interfaces to the virtualized hardware, such as the Extensible Firmware Interface (EFI) by Intel®, and the Advanced Configuration and Power Interface (ACPI), an open industry standard.
Using such firmware interfaces, hardware is represented by embedded firmware within the real/virtualized computer system as a series of objects, each of which can be managed, via the firmware interface, by software (e.g., an operating system) executing on a processor within the computer system. These objects allow, among other things, devices to be operated as “hot swappable” devices, i.e., devices that can be plugged into or unplugged from the computer system without powering down or rebooting the computer system. For example, when a device is plugged in, the firmware notifies the operating system that the device is available, once the device hardware has been initialized. The notification is provided via the firmware interface used by the computer system (e.g., via one or more ACPI notification messages). Similarly, if a device is to be unplugged, the firmware notifies the operating system that a request to eject the device has been received. The operating system verifies that the device is not in use, and then issues a request to the firmware, via the firmware interface, to “eject” the hardware (e.g., via one or more ACPI requests).
The ability to virtualize hardware resources allows subsets of real hardware resources of a real machine to be represented as individual virtual hardware resources of a reduced size or capability, and further allows these virtualized resources to be hot swapped in and out of one or more virtual machines. Thus, for example, a 1 GB memory within a real computer system may be represented as 8, 128 MB virtual memories, dynamically allocated among one or more virtual machines executing on the real computer system. Each resource allocated to a virtual machine is represented by the virtual firmware of the machine as an object (e.g., an ACPI object), which is made accessible by the firmware interface to the operating system executing on the virtual machine. Each virtual memory can be virtually hot swapped on an as-needed basis into or out of any of the virtual machines executing on the real computer system.
However, larger numbers of objects are sometimes used in order to achieve greater flexibility in the allocation of the subsets of a given resource. The use of large numbers of virtualized resources permits the real resource to be allocated with a finer granularity, and reduces the probability that a request to eject a virtual resource will be rejected because the virtual resource is in use and not available to be re-allocated. But as the number of virtualized resources increases, the overhead associated with re-allocating large numbers of virtualized resources can adversely affect the performance of a system, particularly those system that perform large numbers of such re-allocations (e.g., system that perform dynamic load-balancing between virtual machines).